<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script>
		var num =0;
		setInterval(function (argument) {
			if(num==3){
				location.href="http://www.163.com";
			}
			num++;
			document.write(num+"<br>");
		},1000);


		
		// console.log(location)
		// document.write(location)
	</script>
</head>
<body>
	<p onclick="location.reload()">刷新</p>
	<p onclick="location.replace('http://www.baidu.com')">替换1</p>
	<p onclick="location.assign('http://www.baidu.com')">替换2</p>
</body>
</html>